﻿//  Copyright (c) 2011 Ray Liang (http://www.dotnetage.com)
//  Licensed MIT: http://www.opensource.org/licenses/mit-license.php
using System.ComponentModel.DataAnnotations;

namespace DNA.Mvc
{
    public class SimpleWidgetModel
    {
        [Required, RegularExpression("^(?!_)(?!.*?_$)[a-zA-Z0-9_]+$",ErrorMessage="The Name only allow numbers,letters and underscores.")]
        public string Name { get; set; }

        public string Title { get; set; }

        public string Description { get; set; }

        [Required]
        public string ContentType { get; set; }

        [Required]
        public string Category { get; set; }
        
        public string ContentText { get; set; }

        public string ContentUrl { get; set; }
    }
}